import { postAxios, getAxios, postDownloadAxios } from "@/lib/http";

export const vehicleApi = {
  // 获取详情
  getById: data => {
    return getAxios(`/vehicle/getById/${data}`);
  },
  // 添加整车 @author 何杺
  addVehicle: data => {
    return postAxios("/vehicle/add", data);
  },
  // 分页查询整车 @author 何杺
  queryVehicle: data => {
    return postAxios("/vehicle/page/query", data);
  },
  // 批量删除整车 @author 何杺
  batchDeleteVehicle: idList => {
    return postAxios("/vehicle/deleteByIds", idList);
  },
  // 修改整车  @author 何杺
  updateVehicle: data => {
    return postAxios("/vehicle/update", data);
  },
  // 导出全部  @author 何杺
  exportAll: data => {
    return postDownloadAxios("/vehicle/export/all", data);
  },
  // 批量导出  @author 何杺
  batchExport: idList => {
    return postDownloadAxios("/vehicle/export/batch", idList);
  }
};
